package com.jinxiangyang.controller;

import com.jinxiangyang.annotation.OperateLog;
import com.jinxiangyang.domain.vo.Server;
import com.jinxiangyang.utils.enums.BusinessType;
import com.jinxiangyang.utils.enums.OperatorType;
import com.jinxiangyang.utils.result.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jinxiangyang
 * @date 2023/8/14 11:00
 * @description TODO
 **/
@Api(tags = "系统监控接口")
@RestController
@RequestMapping("/monitor/server")
public class ServerController {


    @GetMapping
    @ApiOperation("获取系统信息")
    @OperateLog(title = "系统监控接口",operatorType = OperatorType.ADMIN, businessType = BusinessType.INSERT)
    public AjaxResult getInfo() throws Exception
    {
        Server server = new Server();
        server.copyTo();
        return AjaxResult.success(server);
    }
}
